package test3_17.Vehicles;

import java.sql.SQLOutput;

public class Car extends Vehicles{
    /*
    编写Car（小汽车）类继承于Vehicles类，增加int型成员属性seats（座位）
    还应增加成员方法showCar（在控制台显示小汽车的信息），并编写构造方法。
     */
    private int seats;

    public Car(String brand, String color, int seats) {
        super(brand, color);
        this.seats = seats;
    }

    public void showCar(){
        System.out.println(seats);
    }

    public int getSeats() {
        return seats;
    }

    public void setSeats(int seats) {
        this.seats = seats;
    }
}
